package com.geekca.d5.d6test;

public class FindMaxMin {
    public static void main(String[] args) {
        int[] scores = {88, 77, 99, 23, 10, 65};
        int max = scores[0];
        int min = scores[0];

        for (int i = 1; i < scores.length; i++) {
            if (scores[i] > max) {
                max = scores[i];
            }
            if (scores[i] < min) {
                min = scores[i];
            }
        }
    }
}
